<?php
include("_mysql.php");
include("_settings.php");
include("_functions.php");

$name = username($userID);
?>
<div class="contentMenuTab">
	<h1><?=username($userID)?></h1>
	<div class="clearafter dashboard">
		<div class="left">
			<div class="winLoss">
				<div class="top">
					Win - Loss
					<div class="process">
						<div></div>
					</div>
					<div class="percent clearafter">
						<span class="left">50%</span>
						-
						<span class="right">50%</span>
					</div>
				</div>
				<div class="bottom">
					<div><strong>Country: </strong><span class="iconflag-sweden">Sweden</span></div>
					<div><strong>Registered: </strong>09-10-2012</div>
				</div>
			</div>
			<div class="popularBets">
				<ul>
					<li><h3>Most popular bets</h3></li>						
					<li>
						<h4><a href="#">I bet ipsum dolor sit amet dolor dolan</a></h4>
						<span>320 bets</span><span>$455 in pot</span>
					</li>	
					<li class="last">
						<h4><a href="#">I bet ipsum dolor sit amet dolor dolan</a></h4>
						<span>320 bets</span><span>$455 in pot</span>
					</li>					
				</ul>
			</div>
		</div>
		<div class="right">
			<div class="activeBets">
				<ul>
					<li class="first"><h3>Active bets</h3></li>
					<?php
					$bets = safe_query("SELECT * FROM bets WHERE user='".$userID."' LIMIT 0,5");
					while($ds=mysql_fetch_array($bets))
					{
					$item = mysql_fetch_array(safe_query("SELECT * FROM item WHERE id='".$ds['itemID']."'"));
					$title = cut($item['title'], 40);
					echo '
					<li>
						<h4><a href="#">'.$title.'</a></h4>
						<span class="money"><strong>$'.$ds['money'].'</strong></span> - I think it will
					</li>';
					}
					
					?>
					<li class="last">
						<a href="3">See all ...</a>
					</li>
				</ul>
			</div>
		</div>
	</div>
</div>